package aiguigu07.encapsulation;

/**
 * ClassName: Book
 * Package: aiguigu07.encapsulation
 * Description:
 *
 * @Author ZY
 * @Create 2024/10/10 21:50
 * @Version 1.0
 */
public class Book {

    private String bookName;
    private String author;
    private double price;

    public  String getBookName(){
        return bookName;
    }

    public void setBookName(String bn){
        bookName = bn;
    }

    public String getAuthor(){
        return getAuthor();
    }

    public void setAuthor(String a){
        author = a;
    }

    public double getPrice(){
        return price;
    }

    public void setPrice(double p){
        price = p;
    }

    //获取读书信息
    public String showInfo(){
        return "bookName : " + bookName + " ,author : " + author + " ,price : " + price;
    }
}
